package com.yanqu.road.entity.union.huaben;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_c_hua_ben_union", desc = "商会话本-商会数据")
public class UnionHuaBenUnionData extends DataObject {

    @FieldTypeAnnotation(desc = "商会uid", update = true, select = true)
    private String unionUid;

    @FieldTypeAnnotation(desc = "玩家区服id")
    private long serverId;

    @FieldTypeAnnotation(desc = "难度：评价:次数")
    private Map<Integer, Map<Integer, Integer>> gradeMap = new HashMap<>();

    public String getUnionUid() {
        return unionUid;
    }

    public void setUnionUid(String unionUid) {
        if(!Objects.equals(this.unionUid, unionUid)) {
            this.unionUid = unionUid;
            setUpdateOption();
        }
    }

    public long getServerId() {
        return serverId;
    }

    public void setServerId(long serverId) {
        if(this.serverId != serverId) {
            this.serverId = serverId;
            setUpdateOption();
        }
    }

    public Map<Integer, Map<Integer, Integer>> getGradeMap() {
        return gradeMap;
    }

    public void setGradeMap(Map<Integer, Map<Integer, Integer>> gradeMap) {
        this.gradeMap = gradeMap;
        setUpdateOption();
    }

}
